<?php

namespace App\Models;


use App\Service\Base\Model;

class NewsCate extends Model
{

    // 文章栏目
    protected $table = 'news_cate';
    const UPDATED_AT = null;

    // 缓存字段，用于搜索绑定的字段
    protected $cacheFields = ['id', 'news_id', 'cate_id'];


    // 定义验证操作
    public function rules()
    {

        $add = [
        ];

        $edit = [
        ];

        $info = [
        ];


        $rule = [
            'cate_id' => 'required|numeric',
            'news_id' => 'required|numeric',
        ];

        $msg = [
            'id'      => '自编号',
            'news_id' => '文章ID',
            'cate_id' => '栏目ID',
            'ctime'   => '创建时间',
        ];

        return ['rule' => $rule, 'msg' => $msg, 'add' => $add];
    }
}
